package com.rany.day08.demo06;

public class KeBianCanShu {
    public static void main(String[] args) {
        add();
        add(2,2,3,4,5,6);
    }

    private static void add(int... a) {
        int sum = 0;
        for (int i = 0; i < a.length; i++) {
            sum += a[i];
        }
        System.out.println(sum);
        /*System.out.println(a);
        int length = a.length;
        System.out.println(length);*/
    }
}
